<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
</head>

<body>
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-header">统计查询模块</div>
                    <div class="layui-card-body">
                            <div id="echarts"  style="width: 100%; height: 600px;"></div>                                               

                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="../../layuiadmin/layui/layui.js"></script>
    <script>
        layui.config({
            base: '../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index','carousel', 'echarts', 'form'], function () {
            
    var echarts = layui.echarts,admin = layui.admin ,form = layui.form; 

    var myecharts = echarts.init(document.getElementById('echarts'));
    myecharts.showLoading({
        text : "正在努力的读取数据中。。。。。",
    })
    var option = {
            title: {
                text: '统计数据查询',
                subtext: '精准决策分析',
                x: 'center'
            },
            tooltip: {
                trigger: 'item',
                formatter: "{a} <br/>{b} : {c} ({d}%)"
            },
            legend: {
                orient: 'vertical',
                left: 'left',
                data: []
            },
            series: [{
                name: '危险源数据',
                type: 'pie',
                radius: '55%',
                center: ['50%', '60%'],
                data : [],
                data: [
                    { value: 335, name: '隐患' },
                    { value: 310, name: '已整改' },
                    { value: 234, name: '未整改' }
                ],
                itemStyle: {
                    emphasis: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }]
        };
        myecharts.hideLoading();    //隐藏加载动画
        myecharts.setOption(option); 

        });
    </script>
</body>

</html>